package yxy.game.pm2.module.hero;

import yxy.apple.util.PubSub.MethodSubscriber;
import yxy.apple.util.PubSub.SubscriptionMethod;
import yxy.game.pm2.bean.pubsub.HeroStarPublisher;
import yxy.game.pm2.bean.pubsub.HeroStarPublisher.HeroStarSubscription;

public class HeroSubscriber extends MethodSubscriber {
	static private HeroSubscriber instance;

	public static HeroSubscriber getInstance() {
		if (instance == null) {
			instance = new HeroSubscriber();
			instance.init();
		}
		return instance;
	}

	private void init() {
		HeroStarPublisher.getInstance().subscribe(this);
	}

//	@SubscriptionMethod(Type = HeroSubscription.class)
//	public void receive(HeroSubscription subscription) {
//		Hero hero = subscription.getHero();
//	}
	
	@SubscriptionMethod(Type = HeroStarSubscription.class)
	public void receive(HeroStarSubscription subscription) {

	}
}
